﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PalSave
{
    public partial class PalSaveMain : Form
    {
        public PalSaveMain()
        {
            InitializeComponent();
        }
    

        private void OpenSave_Click(object sender, EventArgs e)
        {
            if (openPalRpg.ShowDialog() == DialogResult.OK)
            {
                textBox1.Text = openPalRpg.FileName;
            }
        }

        private void exit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void LoadRpg_Click(object sender, EventArgs e)
        {
            if (!System.IO.File.Exists(textBox1.Text) || textBox1.Text.Length < 1)
            {
                MessageBox.Show("無此文件");
            }
            else
            {
                this.RpgDataForm = new RpgData(textBox1.Text);
                this.RpgDataForm.Show();
                this.Hide();
            }
        }

    }
}
